package com.hsck.order.kds.setup.adapter

import androidx.annotation.LayoutRes
import com.hsck.order.kds.base.common.BaseAdapter
import com.hsck.order.kds.base.common.BaseViewHolder
import com.hsck.order.kds.base.common.setOnSingleClickListener
import kotlinx.android.synthetic.main.item_printers.view.*

/**
 * 打印失败记录-适配器
 */
class PrinterAdapter(@LayoutRes layoutId: Int) : BaseAdapter<String>(layoutId) {



    var onDelOnClick: ((String) -> Unit) = { showBean -> }
    var onPrinterOnClick: ((String) -> Unit) = { showBean -> }


    override fun onBindViewHolder(holder: BaseViewHolder, data: String) {
        holder.itemView.tv_item_printers_zth.text = "桌台号：厅5"


        holder.itemView.btn_item_printers_del.setOnSingleClickListener {
            onDelOnClick.invoke(data)
        }
        holder.itemView.btn_item_printers_del.setOnSingleClickListener {
            onPrinterOnClick.invoke(data)
        }
    }
}